home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / minix / libsrc~1.z / libsrc~1 / regexp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-12-28  |  1.0 KB  |  45 lines

  1. #ifndef _REGEXP_H
  2. #define _REGEXP_H
  3.  
  4. /*
  5.  * Definitions etc. for regexp(3) routines.
  6.  *
  7.  * Caveat:  this is V8 regexp(3) [actually, a reimplementation thereof],
  8.  * not the System V one.
  9.  */
  10. #ifndef __GNUC__
  11. #define void int
  12. #endif
  13. #define CHARBITS 0377
  14. #define strchr index
  15. #define NSUBEXP  10
  16. typedef struct regexp {
  17.     char *startp[NSUBEXP];
  18.     char *endp[NSUBEXP];
  19.     char regstart;        /* Internal use only. */
  20.     char reganch;        /* Internal use only. */
  21.     char *regmust;        /* Internal use only. */
  22.     int regmlen;        /* Internal use only. */
  23.     char program[1];    /* Unwarranted chumminess with compiler. */
  24. } regexp;
  25.  
  26. #ifndef __STDC__
  27. extern regexp *regcomp();
  28. extern int regexec();
  29. extern void regsub();
  30. extern void regerror();
  31. #else
  32. #ifndef __NO_PROTO__
  33. struct    regexp *regcomp(char *);
  34. int    regexec(struct regexp *, char *, int);
  35. void    regsub(struct regexp *, char *, char *);
  36. #else
  37. extern regexp *regcomp();
  38. extern int regexec();
  39. extern void regsub();
  40. extern void regerror();
  41. #endif /* __NO_PROTO__ */
  42. #endif /* __STDC__ */
  43.  
  44. #endif /* _REGEXP_H */
  45.